Skip to main content
POST
/
v1
/
test-runs
/
single-turn
/
workflow
Trigger single-turn workflow test run
curl --request POST \
  --url https://api.getmaxim.ai/v1/test-runs/single-turn/workflow \
  --header 'Content-Type: application/json' \
  --header 'x-maxim-api-key: <api-key>' \
  --data '
{
  "workspaceId": "<string>",
  "datasetId": "<string>",
  "workflowId": "<string>",
  "datasetSplitId": "<string>",
  "evaluators": [
    {
      "id": "<string>",
      "name": "<string>",
      "variableMapping": {}
    }
  ],
  "contextToEvaluate": [
    {
      "type": "DATASOURCE",
      "payload": "<string>"
    }
  ],
  "environmentId": "<string>"
}
'
{
  "data": {
    "id": "<string>",
    "workspaceId": "<string>",
    "status": "<string>",
    "entityType": "<string>",
    "createdAt": "<string>",
    "entityId": "<string>"
  }
}

Authorizations

x-maxim-api-key
string
header
required

API key for authentication

Body

application/json

Payload for triggering a single-turn workflow test run

workspaceId
string
required

Workspace ID where the test run will execute

datasetId
string
required

Dataset ID to use for the test run

workflowId
string
required

Workflow ID to run

datasetSplitId
string

Optional dataset split ID

evaluators
object[]

Array of evaluators with optional variable mapping to run on the test results.

contextToEvaluate
object[]

Context sources to include in evaluation

environmentId
string

Environment ID for variable resolution in the workflow config

Response

Single-turn workflow test run triggered successfully

data
object
required

Response from triggering a simulation